<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
if (sizeof($model) > 0) {
    foreach ($model as $collection) {
        echo '<b>' . CHtml::link($collection->name, array('collection/view', 'id' => $collection->id)) . '</b><br>';
        if ($collection->user_created == Yii::app()->user->id) {
            echo '<i>' . CHtml::link('Xóa', array('collection/delete', 'id' => $collection->id)) . '</i><br>';
        }
    }
} else {
    echo 'Empty.<br>';
}
if ($user->id == Yii::app()->user->id) {
    echo CHtml::link('Create Collection', array('collection/create')) . '<br>';
}
?>
